//
//  UIButton+Gradual.m
//  LuxuryGoods
//
//  Created by 刘星辰 on 2018/5/26.
//  Copyright © 2018年 Future. All rights reserved.
//

#import "UIButton+Gradual.h"
#import "LGImageManagerIO.h"

@implementation UIButton (Gradual)

- (void)addGradualColorAndCorner
{
     [self setCornerRadius:self.height / 2.0];
    [self addGradualColor];
}

- (void)addGradualColor
{
    UIImage *image = [LGImageManagerIO createGradualColorImage:self.size startColor:LOW_COLOR endColor:HIGH_COLOR];
    [self setBackgroundImage:image forState:UIControlStateNormal];
}

@end
